home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xcmd / xrulesde.sit / Xrules™ Tutorial / card_16907.txt < prev    next >
Encoding:
Text File  |  1991-06-24  |  1.2 KB  |  37 lines

  1. -- card: 16907 from stack: in
  2. -- bmap block id: 19183
  3. -- flags: 4000
  4. -- background id: 7050
  5. -- name: 2-daemons
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0007
  11. -- rect: left=2 top=26 right=314 bottom=511
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 22
  16. -- text size: 10
  17. -- style flags: 0
  18. -- line height: 13
  19. -- part name: doc
  20.  
  21.  
  22. -- part contents for card part 1
  23. ----- text -----
  24.   -- the rule base
  25.     global declarations
  26.     fact declarations
  27.     assignments
  28.     rules & DAEMONS
  29.  
  30. Rules and daemons may be interspersed but they must follow the global declarations, fact declarations, and assignments.  Daemons use syntax similar to rules.  The differences are that DAEMON is used instead of RULE, and WHEN is used instead of IF. The syntax and constraints for conditional statements are the same as for rules.  The THEN and ELSE statements are like those in rules except that the CONCLUDE statement is not allowed in daemons.  The syntax for daemons is:
  31.  
  32.     daemon  :=  [DAEMON daemon_id]
  33.                 WHEN conditionals 
  34.                 THEN assignments 
  35.                 [ELSE assignments] 
  36.                 [END IF [END daemon_id]]
  37.